package com.utils.Exception;

import java.util.InputMismatchException;

public class TryDemo {
    public static void main(String[] args) {
        try{
            int one = 12;
            int two = 0;
            int three = one/two;
        }catch (ArithmeticException e){
            e.printStackTrace();
            System.exit(-1);
            System.out.println("除数不能为0");
        }catch(InputMismatchException e){
            System.out.println("请输入整数");
        }catch(Exception e){
            System.out.println("出错兜底");
        }
    }
}
